package com.biostime.qdingding.modules.qd.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.biostime.qdingding.common.mybatis.MyBatisDao;
import com.biostime.qdingding.common.persistence.CrudDao;
import com.biostime.qdingding.modules.qd.api.dto.BalanceDto;
import com.biostime.qdingding.modules.qd.api.dto.TransrecordDto;
import com.biostime.qdingding.modules.qd.entity.Student;
import com.biostime.qdingding.modules.qd.entity.Transrecord;


/**
 * 收支记录Dao
 * @author king
 * @version 2015-11-12
 */
@MyBatisDao
public interface TransrecordDao extends CrudDao<Transrecord> {
	
	/**
	 * 获取合同所收到的金额
	 * @return
	 */
	public List<Transrecord> getContractRecord(Transrecord transrecord);
		
	
	
//	<!-- ————————————————————————————楚河汉界，谁敢动我的，打死 ————————————————————————————————————-->		
	public List<TransrecordDto> apiGetTransrecords(String studentId);
	public BalanceDto getBalance(Student student);
	public TransrecordDto apiTransrecordByOrder(@Param("studentId")String studentId,@Param("courseOrderId") String courseOrderId);
	public Transrecord apiGetByCode(@Param("code") String code);
	public Double apiGetRecharge(@Param("studentId")String studentId,@Param("contractId")String contractId);
}